package com.suse.service.user.service;

import com.suse.common.base.model.param.BasePageQueryParam;
import com.suse.common.config.response.R;
import com.suse.model.dto.UserDto;
import com.suse.service.user.entity.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.suse.service.user.model.param.LoginParam;
import com.suse.service.user.model.param.RegisterParam;

/**
 * <p>
 * 会员表 服务类
 * </p>
 *
 * @author 辜玉彬
 * @since 2022-08-22
 */
public interface UserService extends IService<User> {

    /**
     * 查询用户分页
     * @param pageQueryParam 分页查询参数
     * @return R
     */
    R page(BasePageQueryParam pageQueryParam);

    R login(LoginParam loginParam);

    R register(RegisterParam registerParam);

    /**
     * 通过ID获取用户数据传输对象
     * @param id ID
     * @return R
     */
    UserDto getUserDtoById(String id);

    /**
     * 通过openid获取用户信息
     * @param openid openid
     * @return 用户信息
     */
    User getUserByOpenid(String openid);

    /**
     * 获取每日用户注册数
     * @return R
     */
    R getDailyRegisterCount(String date);

}
